<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ include file="/jsp/common/common.jsp" %>
</head>
<body>

<div class="tableMainWarp">
  <div class="top-div"><em></em><span>&nbsp;>&nbsp;系统监控&nbsp;>&nbsp;系统日志</span></div>
  <div>
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="search-table">
      <tr>
        <td>
	        <button class="btn-table" id="searchButton">查询</button>
        </td>
      </tr>
    </table>
  </div>
  <div class="tablelist">
    <div class="tabcon" id="middleCon"  style="overflow: auto;"></div>
    <div id="paginationDiv"  class="page clearfix"></div>
  </div>
</div>


<script type="text/javascript">
$(document).ready(function(){
	
	var bodyHt=document.documentElement.clientHeight;
	var tableDivHeight = bodyHt-147;	
	$('#middleCon').height(tableDivHeight);
	
	getPageData();

	initTable();
	
	blindPageElement();
	
});

function blindPageElement(){

	$('#searchButton').on('click',function(){
		$('#middleCon').tablegrid('reload');
	});
}

function initTable(){
 	
	var url = '<%=basePath%>/webframework/monitor/logManage/getLogListData.do?logFileName=searchAllFile';
	
	$('#middleCon').tablegrid({
		url: url,
		columns:[	
		   	        {field:'fileName',title:'名称',formatter:contentFormatter,width:50},
		   	        {field:'lastModifyTimeStr',title:'最后修改时间',width:25},
		   	     	{field:'fileSizeStr',title:'文件大小',width:25}
			    ],
	    isPagination:false,
	    resizeColumns : false,
	    tableClass : 'table-form'
	});
}

function contentFormatter(value, rowdata, index){
	
	var url = '<%=basePath%>/webframework/monitor/logManage/downloadFile.do?filePath='+rowdata.pathName;
	var obj = $('<a></a>').append(rowdata.fileName).attr('href',url);
	
	return obj;
}

function getPageData(){
	
	
}



</script>
</body>
</html>